A computing system includes physical memory (main memory), that is mapped to virtual memory, which can be divided into regions, such as a user space and a kernel space. The user space is reserved for user mode programs. The kernel space is reserved for running an operating system, such as Linux® OS, SELinux OS, Windows® OS, etc. The kernel space can include a memory space for an operational kernel of the operating system and can include a private and protected region of memory space that is reserved for executing a new operating system for when an initial operating system crashes. When an initial operating system in the operational kernel experiences a system failure, a new operating system can be booted from a second kernel, also known as a crash kernel and/or a capture kernel, that resides in the reserved private region of memory space. Operating systems can provide a crash recovery mechanism that boots a crash kernel in a new operating system using the protected region of memory. The protected region of memory that stores the crash kernel is non-writable during operation of the initial operating system. When the initial operating system crashes, the new operating system can then reinitialize the computing system hardware without modifying the state of the crashed operating system memory. For example, the Linux® OS provides a crash recovery mechanism known as ‘kdump’ that executes from a new operating system and collects state data for the crashed operating system (the first operational kernel) for post-mortem analysis.
The booting of the second kernel requires, by definition, sufficient amount of memory space to boot from, and thus, the first operational kernel sets aside (reserves) memory for the second kernel. The reserved memory space for the second kernel is protected from general use and is not available during normal operation of the initial operating system. Typically, the size for the reserved memory space for the second kernel is significant in size, but can vary based on the system hardware configuration, and use. Some computing systems may require a very small amount of memory to boot the second kernel successfully, while others may require a very large amount of memory space for the second kernel. Conventional solutions, however, usually reserve the memory space for the second kernel using estimate memory requirements based on common configurations. Typically, a user, such as a system administrator, decides (estimates) the amount of memory to reserve for the second kernel and manually reserves the memory space for the second kernel. The user can estimate how much space to reserve based on a combination of a manufacturer recommendation, the system environment, and other factors. In some cases, the user elects to use a default size, such as 128 MB. As such, the selection of a memory size that is considered to be ‘safe’ for most system deployments is usually an over-estimation and can often be wasteful, especially on a computing system which is already memory constrained. However, a user's estimate of a memory size that is too small leads to the new operating system failing to capture the crash data (crash dump) due to insufficient memory space.